<template>
    <div class="customerinfo">
        <el-card class="box-card">
            <template #header>
                <div class="card-header">
                    <div class="fistheader">
                        <div class="colorBar"></div>
                        <div>回款计划</div>
                    </div>


                </div>
            </template>
            <PayVue />

        </el-card>
        <div class="gap"></div>
        <el-card class="box-card">
            <template #header>
                <div class="card-header">
                    <div class="fistheader">
                        <div class="colorBar"></div>
                        <div>回款信息</div>
                    </div>
                    <div></div>
                </div>
            </template>
            <PaymesVue />
            <div class="buttonIcon">
                <el-button type="primary" @click="paymentin">新增</el-button>
            </div>

        </el-card>


    </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import PayVue from "./payback.vue";
import PaymesVue from "./paymes.vue";

interface IProps {
    dialogtrue: (value: boolean) => void
    message: Array<{
        contractNumber: string;
        contractName: string;
        customerName: string;
        contractAmount: number;
        contractStatus: string;
        contractType: string;
        contractFile: string;
        relatedProduct: string;
        signer: string;
        signDate: string;
        expireDate: string;
        paymentMethod: string;
        advancePayment: number;
        note: string;
    }>;
}

// Define props
const props = defineProps<IProps>();
const cpaymentindialogVisible = ref(false)
const emit = defineEmits(["payadd"])
const paymentin = () => {
    emit(("payadd"), "payaddvue")
}
</script>

<style lang="scss" scoped>
.gap {
    height: 10px;
    background-color: #f2f2f2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 0;
}

.el-card {
    margin-bottom: 20px;
    width: 100%;

    .el-card__header {
        border-bottom: 0;
        padding: 0;
        margin-left: 10px;
        margin-top: 10px;

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;

            .fistheader {
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .colorBar {
                width: 4px;
                height: 15px;
                background-color: #367eea;
                margin-right: 10px;
            }


        }


    }

}

.contract {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;

    .contractleft {
        width: 50%;



        div {
            width: 100%;
            margin: 20px 10px 20px 0;
            display: flex;
            justify-content: space-around;
            align-items: center;


        }
    }



    .contractright {
        width: 50%;

        div {
            width: 100%;
            margin: 20px 10px 20px 0;
            display: flex;
            justify-content: space-around;
            align-items: center;


        }
    }
}

.el-overlay {
    .el-overlay-dialog {


        .el-dialog {
            .el-dialog__body {
                .QRCode {
                    width: 100px;
                    height: 100px;
                    margin: auto;

                }
            }



            .el-dialog__header {
                width: 100%;
                margin: 0;
                padding: 0;
                height: 50px;
                display: flex;
                justify-content: space-between;
                align-items: center;
                background-color: red;

                .my-header {
                    width: 100%;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    text-align: center;

                    span {
                        width: 100%;
                        text-align: center;
                    }

                    i {
                        margin-right: 10px;
                    }



                }
            }


        }
    }

}

.closestylus {
    cursor: pointer;
}

.buttonIcon {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;

    .el-button {

        margin-top: 20px;

    }
}
</style>